package users

import (
	"ginx/internal/utils"

	"github.com/gin-gonic/gin"
)

func (c *ControllerV1) Update(ctx *gin.Context) {
	id := ctx.Param("id")

	res, err := c.users.QueryById(utils.StringToInt(id))
	if err != nil {
		ctx.Set("error", err.Error())
		return
	}
	ctx.Set("response", res)
}
